import { defineStore } from "pinia";
import piniaPersistConfig from "@/stores/helper/persist";

export const loginStore = defineStore({
  id: "login",
  state: (): any => ({
    databaseName: "",
    serverIpAddress: "",
    strGongSiMingCheng: "",
    strYiYuanMingCheng: "",
    stripaddress: "",
    XiTongname: []
  }),
  actions: {
    XiTongnameChange(state: any) {
      this.XiTongname = state;
    },
    setDatabaseName(state: any) {
      this.databaseName = state;
    },
    setServerIpAddress(state: any) {
      this.serverIpAddress = state;
    },
    setStrGongSiMingCheng(state: any) {
      this.strGongSiMingCheng = state;
    },
    // 医院名称
    strYiYuanMingChengchange(state: any) {
      this.strYiYuanMingCheng = state;
    },
    setStripaddress(state: any) {
      this.stripaddress = state;
    }
  },
  persist: piniaPersistConfig("login")
});
